import axios from '@/libs/api.request'

const resetPwdApi = {

  getResetPwdCaptcha(phone) {
    return axios.request({
      url: '/web/resetPwdCaptcha',
      params: {phone},
      method: 'post'
    })
  },

  getResetPwdCaptchaEmail(mail) {
    return axios.request({
      url: '/web/mail/resetPwdCaptcha',
      params: {mail},
      method: 'post'
    })
  },
  resetPwdEmail(mail, password, captcha) {
    return axios.request({
      url: '/web/resetPwdByMail',
      data: {
        mail, password, captcha
      },
      method: 'post'
    })
  },
  resetPwd(phone, password, captcha) {
    return axios.request({
      url: '/web/resetPwdByPhone',
      data: {
        phone, password, captcha
      },
      method: 'post'
    })
  },
}

export default resetPwdApi
